import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    //路由
    { path: '/', name: 'login', component: () => import('@/views/Login.vue'), hide:true },
    { path: '/home', name: 'home', component: () => import('@/views/Home.vue'), hide:true },
    { 
      path: '/basic', 
      name: '基础设置', 
      sort:'1',
      component: () => import('@/views/Home.vue'),
      children: [
        { sort:'1-1', path: 'msg', name: '短信记录', component: () => import('@/views/BasicSetting/MsgRecord')},
        { sort:'1-2', path: 'phone', name: '配置管理', component: () => import('@/views/BasicSetting/PhoneSet')}
      ]
    },
    { 
      path: '/cut_active', 
      name: '砍价活动', 
      sort:'3',
      component: () => import('@/views/Home.vue'),
      children: [
        { sort:'3-1', path: 'cut_good', name: '砍价商品', component: () => import('@/views/CutActive/CutGood')},
        { sort:'3-2', path: 'cut_red', name: '砍价红包', component: () => import('@/views/CutActive/CutRed')}
      ]
    },
    
    
  ]
})
